from .models import Note
from .serializers import NoteSerializer
from rest_framework import generics, permissions


class NoteListAPI(generics.ListAPIView, generics.CreateAPIView):
    permission_classes = [permissions.IsAuthenticated]
    queryset = Note.objects.all()
    serializer_class = NoteSerializer


class NoteAPI(generics.DestroyAPIView):
    permission_classes = [permissions.IsAuthenticated]
    queryset = Note.objects.all()
    serializer_class = NoteSerializer
